#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
@File Name: 简单的测时工具_timer.py
@Author: LT
@Date: 2021/9/27 13:55
# -----------------------------------------------------------------------------------------------------
@Description: 
write here
# -----------------------------------------------------------------------------------------------------
"""


def test(reps, func, *args):
    """
    :param reps: 重复执行的次数
    :param func: 重复执行的函数
    :param args: 重复执行的函数所需要的参数
    :return: float seconds
    """
    import time
    start = time.time()            # 浮点类型的CPU时间
    for i in range(reps):           # 调用reps次函数func
        func(*args)                 # 抛弃了函数的返回值
    return time.time() - start     # 相减得到运行时间


if __name__ == '__main__':
    pass
